import requests
with open('img/pic1.jpg', 'wb') as handle:
response = requests.get("https://www.taiwan.net.tw/pic.ashx?qp=1/big_scenic_spots/pic_3229_28.jpg&sizetype=2", stream=True)
if not response.ok:
print(response)
for block in response.iter_content(1024):
if not block:
break
handle.write(block)